<?php
/**
 * Created by PhpStorm.
 * User: qingyun
 * Date: 19/5/8
 * Time: 上午9:01
 */


$controller = isset($_GET['c']) ? $_GET['c'] : 'Index';
$method = isset($_GET['m']) ? $_GET['m'] : 'index';
$group = isset($_GET['g']) ? $_GET['g'] : 'Front';


function auto($className){

//print_r($className);
    $className = str_replace('\\', '/', $className);
    $path = $className.'.php';
    if (file_exists($path)){
        include_once $path;
    }
//    include_once 'Controller/'.$className.'.php';

}
spl_autoload_register('auto');


$allClassName = '\Controller\\'.$group.'\\'.$controller;

$xxx = new $allClassName;
$xxx->$method();



